home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #2 / Monster Media No. 2 (Monster Media)(1994).ISO / math / eval30.zip / DEMO.BAT next >
DOS Batch File  |  1994-06-30  |  799b  |  39 lines

  1. rem
  2. rem    This batch file demonstrates EVAL.EXE
  3. rem
  4. rem Calculate the sum of 2,3,5,7 and 11.
  5. EVAL 2+3+5+7+11
  6. pause
  7. rem Find 2 to the power of (3+7).
  8. EVAL 2^(3+7)
  9. pause
  10. rem Find the sum of 12 eight-sided dice rolled randomly
  11. rem and add 2 to the result.
  12. rem (For RPG players, this is 12d8+2)
  13. EVAL 12?8+2
  14. pause
  15. rem Find the TAN of 30 degrees.
  16. EVAL TAN(30*PI/180)
  17. pause
  18. rem Convert the number 123,456 to hex.
  19. EVAL 123456,x
  20. pause
  21. rem Convert the number 500 to binary.
  22. EVAL 500,b
  23. pause
  24. rem Convert the number 10000 to base 4.
  25. EVAL 10000,4
  26. pause
  27. rem Convert the hex number 01AB to decimal.
  28. EVAL 0x1AB
  29. pause
  30. rem Convert the hex number 12 to binary
  31. EVAL 0x12,b
  32. pause
  33. rem Add the hex number 100 to the decimal number 100
  34. EVAL 0x100+100
  35. pause
  36. rem Show PI in hex
  37. EVAL PI,x
  38.  
  39.